/* 违规记录 */
<template>
  <div class="app-container">
    <el-table v-loading="loading" :data="catUserLogList">
      <el-table-column label="违规时间" align="center" prop="createTiem" />
      <el-table-column label="违规原因" align="center" prop="createTiem" />
      <el-table-column label="处理方式" align="center" prop="createTiem" />
    </el-table>
    
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

  </div>
</template>

<script>
import { listUserViolation} from "@/api/system/userViolation";

export default {
  data() {
    return {
      // 遮罩层
      loading: true,
      // 总条数
      total: 0,
      // 用户登录日志表格数据
      catUserLogList: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        userId: undefined,
      }
    };
  },
  created() {
  },
  methods: {
    getList() {
      this.loading = true;
      listUserViolation(this.queryParams).then(response => {
        this.catUserLogList = response.rows;
        this.total = parseInt(response.total);
        this.loading = false;
      });
    },
    init(userId){
      this.queryParams.userId = userId
      this.getList()
    }
  }
};
</script>